'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;

  router.get('/', controller.home.getRoot);

  router.post('/login', controller.home.login);
  router.post('/register', controller.home.register);
  router.get('/getUser', controller.home.getUser);
  router.get('/logout', controller.home.logout);

  router.post('/room', controller.room.getRoom);

  router.get('/getTest', controller.test.getTest);
  router.get('/getQuestion', controller.test.getQuestions);
  router.post('/scoring', controller.test.scoring);

  router.get('/getCaseInfo', controller.learn.getCaseInfo);
  router.post('/getCase', controller.learn.getCase);
};
